class Topic {
  String topicId;
  String userId;
  String userName;
  String imgUrl;
  bool placeTop;
  bool recommd;
  String typeDesc;
  String typeId;
  String title;
  String content;
  String imageUrls;
  int repayCount;
  int praiseCount;
  int status;
  String reason;
  String createAt;
  String replyAt;
  bool isPraise = false;

  Topic(
      {this.topicId,
      this.userId,
      this.userName,
      this.imgUrl,
      this.placeTop,
      this.recommd,
      this.typeDesc,
      this.typeId,
      this.title,
      this.content,
      this.imageUrls,
      this.repayCount,
      this.praiseCount,
      this.status,
      this.reason,
      this.createAt,
      this.replyAt,
      this.isPraise,
      });

  Topic.fromJson(Map<String, dynamic> json) {
    topicId = json['topicId'];
    userId = json['userId'];
    userName = json['userName'];
    imgUrl = json['imgUrl'];
    placeTop = json['placeTop'];
    recommd = json['recommd'];
    typeDesc = json['typeDesc'];
    typeId = json['typeId'];
    title = json['title'];
    content = json['content'];
    imageUrls = json['imageUrls'];
    repayCount = json['repayCount'];
    praiseCount = json['praiseCount'];
    status = json['status'];
    reason = json['reason'];
    createAt = json['createAt'];
    replyAt = json['replyAt'];
    isPraise = json['isPraise'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['topicId'] = this.topicId;
    data['userId'] = this.userId;
    data['userName'] = this.userName;
    data['imgUrl'] = this.imgUrl;
    data['placeTop'] = this.placeTop;
    data['recommd'] = this.recommd;
    data['typeDesc'] = this.typeDesc;
    data['typeId'] = this.typeId;
    data['title'] = this.title;
    data['content'] = this.content;
    data['imageUrls'] = this.imageUrls;
    data['repayCount'] = this.repayCount;
    data['praiseCount'] = this.praiseCount;
    data['status'] = this.status;
    data['reason'] = this.reason;
    data['createAt'] = this.createAt;
    data['replyAt'] = this.replyAt;
    data['isPraise'] = this.isPraise;
    return data;
  }
}
